import {Injectable} from '@angular/core';
import {BaseHttpService} from '../base-http.service';
import {Observable} from 'rxjs';

export interface MsdsControlProtect {
  mac: string;
  msdsEntprId?: number;
  id?: number;
  controlProject: string;
  peopleProtect: string;
  protectBody: string;
  protectBreath: string;
  protectEye: string;
  protectHand: string;
  protectOther: string;
  pctwa: string;
  pcstel: string;
}


@Injectable({
  providedIn: 'root'
})
export class MsdsControlProtectHttpService {

  constructor(public http: BaseHttpService) {
  }


  /*新增msdsControlProtect 信息*/
  public addMsdsControlProtect(param: MsdsControlProtect): Observable<number> {
    return this.http.post('/msdsControlProtect', param, {needSuccessInfo: true});
  }

  /*修改msdsControlProtect信息*/
  public editMsdsControlProtect(param: MsdsControlProtect): Observable<void> {
    return this.http.put('/msdsControlProtect', param, {needSuccessInfo: true});
  }

  /*查询msdsControlProtect详情*/
  public getMsdsControlProtectDetail(msdsEntprId: number): Observable<MsdsControlProtect> {
    return this.http.get('/msdsControlProtect/' + msdsEntprId);
  }


}
